<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
<title>客户选择管理</title>
<meta name="decorator" content="default" />
<script type="text/javascript">
	$(document).ready(function() {

	});
	function page(n, s) {
		$("#pageNo").val(n);
		$("#pageSize").val(s);
		$("#searchForm").submit();
		return false;
	}
</script>
<style type="text/css">


</style>

</head>
<body>
	<ul class="nav nav-tabs">
		<li class="active">
			<a href="javascript:void(0)">客户列表</a>
		</li>
	</ul>
<%-- 	<form:form id="searchForm" modelAttribute="findCustomer" action="${ctx}/crm/findcustomer/findCustomer/searchCustomer" method="post" class="breadcrumb form-search">
		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}" />
		<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}" />
		<ul class="ul-form">
			<li>
				<label>公司名：</label>
				<form:select path="name" htmlEscape="false" maxlength="100" class="input-medium">
					<form:option value="">请选择</form:option>
					<c:forEach items="${customerNames }" var="customerName">
						<form:option value="${customerName }">${customerName }</form:option>
					</c:forEach>
				</form:select>
			</li>
			<li>
				<label>行业名：</label>
				<form:select path="trade" htmlEscape="false" maxlength="100" class="input-medium" style="width:200px;">
					<form:option value="">请选择</form:option>
					<c:forEach items="${industryNames }" var="industryName">
						<form:option value="${industryName }">${industryName }</form:option>
					</c:forEach>
				</form:select>
			</li>
			<li class="btns">
				<input id="btnSubmit" class="btn btn-primary" type="submit" value="查询" />
			</li>
			<span style="float: left; margin-left: 250px; margin-top: 5px;" class="clearfix">
				<shiro:hasPermission name="findcustomer:findCustomer:mycollect">
					<input id="myCollect" onclick="javascrpt:window.location='${ctx}/crm/findcustomer/findCustomer/myCollect'" class="btn btn-primary" type="button" value="我的收藏" />
				</shiro:hasPermission>
			</span>
		</ul>
	</form:form> 
	 <form action="${ctx}/crm/findcustomer/findCustomer/exportAll" style="float:left;margin-left:700px;margin-top:-45px; width: 80px;">
		<input type="hidden" name="customerIds" value='<c:forEach items="${page.list }" var="customer">
			${customer.id },
		</c:forEach>' />
		<shiro:hasPermission name="findcustomer:findCustomer:customerExport">
			<input id="export"  class="btn btn-primary" type="submit" value="导出" />
		</shiro:hasPermission>
	</form>  --%>
	<sys:message content="${message}" />
	<table id="contentTable"  class="table table-striped table-bordered table-condensed">
		<thead>
			<tr>
				<th>公司名</th>
				<!-- <th>地址</th> -->
				<th>状态</th>
				<th>添加人</th>
				<th>添加时间</th>
				<th>最后修改人</th>
				<th>最后修改时间</th>
				<shiro:hasPermission name="findcustomer:findCustomer:deleteCustomer">
					<th>操作</th>
				</shiro:hasPermission>
			</tr>
		</thead>
		<tbody>
		<c:forEach items="${findCustomerList}" var="findCustomer">
				<tr>
					<td>
						<a href="${ctx}/crm/findcustomer/findCustomer/form?id=${findCustomer.id}"> ${findCustomer.name} </a>
					</td>
					<%-- <td>${findCustomer.address}</td> --%>
					<td>${findCustomer.statusId}</td>
					<td>${findCustomer.createUser}</td>
					<td>
						<fmt:formatDate value="${findCustomer.createDate}" pattern="yyyy-MM-dd HH:mm:ss" />
					</td>
					<td>${findCustomer.updateUser}</td>
					<td>
						<fmt:formatDate value="${findCustomer.updateDate}" pattern="yyyy-MM-dd HH:mm:ss" />
					</td>

				
						<td>
							<a href="${ctx}/crm/workbench/workbench/release?customerId=${findCustomer.id}" >释放</a>
						&nbsp;
							<a href="${ctx}/crm/workbench/workbench/pitchOn?customerId=${findCustomer.id}" >选择</a>
						</td>
					
					
				</tr>
				</c:forEach>
		</tbody>
	</table>
	
	<br/>
	<c:if test="${empty findCustomerList}">
		<p style="font-size: 20px; width: 350px; margin: 0px auto;">请去选择客户</p>
	</c:if>
	
	<div style="width: 55px;position: fixed;top:5px;right:5%;">
		<button class="btn" onclick="javascript:window.location='${ctx}/crm/workbench/workbench/list'">返回</button>
	</div>
	
</body>
</html>